import re
import chapter

def start(booknum):
    chapter.downbook(booknum)
    

print("欢迎使用书棋小说助手")
while True:
    print("")
    print("请输入小说编号")
    booknum = input()
    if re.match("^\d+$",booknum) == None:
        print(">_< 错误的书本编号")
    else:
        print("系统正在搜索小说，请稍待...")
        start(booknum)